Component({
	data: {
		selected: 0,
		color: "#666666",
		selectedColor: "#36A1EE",
		list: [{
				pagePath: "/pages/index/index",
				iconPath: "/static/images/tabbar/arix.png",
				selectedIconPath: "/static/images/tabbar/arix-1.png",
				text: "首页"
			},
			{
				pagePath: "/pages/publish/index",
				iconPath: "/static/images/tabbar/ht.png",
				selectedIconPath: "/static/images/tabbar/ht-1.png",
				text: "扫码",
				isSpecial: true
			},
			{
				pagePath: "/pages/my/index",
				iconPath: "/static/images/tabbar/usdt.png",
				selectedIconPath: "/static/images/tabbar/usdt-1.png",
				text: "我的"
			}
		]
	},
	attached() {},
	methods: {
		switchTab(e) {
			const data = e.currentTarget.dataset
			console.log(data)
			const url = data.path
			if (url === '/pages/publish/index') {
				wx.navigateTo({
					url
				})
			} else {
				wx.switchTab({
					url
				})
				this.setData({
					selected: data.index
				})
			}
		}
	}
})